#ifndef __SIMPLE_DB_H__
#define __SIMPLE_DB_H__

typedef void * DBHANDLE;

// open close
DBHANDLE db_open(const char* path, int oflag, ...);
void db_close(DBHANDLE db);

// curd
int db_store(DBHANDLE db, const char* key, const char* data, int flag);
int db_fetch(DBHANDLE db, const char* key);
int db_delete(DBHANDLE db, const char* key);

//
void db_rewind(DBHANDLE db);
char * db_nextrec(DBHANDLE db, char *key);

#endif